package cn.edu.neusoft.maxingxin231.yuejian06.Activity;

import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;

import cn.edu.neusoft.maxingxin231.yuejian06.R;

public class TrainApplyActivity extends BaseActivity {
    String train_name,train_intro,train_type;
    TextView tv_trainname,tv_traintype,tv_trainintro;
    EditText ed_name,ed_phone;
    ImageButton imgbtn_return;
    Button btn_submit;
    @Override
    void initView() {
        setLayout_file(R.layout.activity_trainapply);
        imgbtn_return = (ImageButton)findViewById(R.id.imgbtn_return);
        tv_trainname = (TextView)findViewById(R.id.tv_trainname);
        tv_traintype = (TextView)findViewById(R.id.tv_traintype);
        tv_trainintro = (TextView)findViewById(R.id.tv_trainintro);
        ed_name=(EditText)findViewById(R.id.ed_name);
        ed_phone=(EditText)findViewById(R.id.ed_phone);
        btn_submit=(Button)findViewById(R.id.btn_submit);


        train_name = getIntent().getStringExtra("train_name");
        train_intro = getIntent().getStringExtra("train_intro");
        train_type = getIntent().getStringExtra("train_type");

        tv_trainname.setText(train_name);
        tv_trainintro.setText(train_intro);
        tv_traintype.setText(train_type);

    }

    @Override
    void initEvent() {
        imgbtn_return.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        btn_submit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                showToast("报名成功");
                finish();
            }
        });

    }

    @Override
    void initData() {

    }
}
